package cn.aj.system.mapper;

import cn.aj.system.domain.Permission;
import cn.aj.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author aj
 * @since 2022-11-29
 */
public interface PermissionMapper extends BaseMapper<Permission> {
    // 查询sn
    Permission getBySn(String permissionSn);
    // 删除
    void delRolePermission(Long roleId);
    // 新增角色绑定按钮权限
    void addRolePermission(@Param("roleId")Long id, @Param("permissions") List<Long>  permissions);

    List<String> loadOwnPermissionByLogininId(Long id);
}
